{include file="common/_meta" /}

<title>基本设置</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
	<span class="c-gray en">&gt;</span>
	系统管理
	<span class="c-gray en">&gt;</span>
	分销设置
	<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
	<form class="form form-horizontal" id="form-article-add">
		<div id="tab-system" class="HuiTab">
			<div class="tabBar cl">
				<span>分销设置</span>
			</div>
			<div class="tabCon">
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>分销开关：</label>
					<div class="formControls col-xs-8 col-sm-9 skin-minimal">
						<div class="radio-box">
							<input name="BACK_STATUS" type="radio" value="1" id="">
							<label for="sex-1">开启</label>
						</div>
						<div class="radio-box">
							<input type="radio" value="0" id="" name="BACK_STATUS">
							<label for="sex-2" class="c-red">关闭</label>
						</div>
					</div>
				</div>
				<div class="row cl hidden">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						推荐红包金额（元）：</label>
					<div class="formControls col-xs-2 col-sm-3">
						<input type="text" name="HONG_BAO" id="website-title" placeholder="" value="{$info['HONG_BAO']}" class="input-text">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						推荐奖励比例(%)：</label>
					<div class="formControls col-xs-2 col-sm-3">
						<input type="text" name="BACK_RATE" id="website-title" placeholder="" value="{$info['BACK_RATE']}" class="input-text">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						市级代理奖励比例(%)：</label>
					<div class="formControls col-xs-2 col-sm-3">
						<input type="text" name="AGENT_RATE" id="website-title" placeholder="" value="{$info['AGENT_RATE']}" class="input-text">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						区域代理奖励比例(%)：</label>
					<div class="formControls col-xs-2 col-sm-3">
						<input type="text" name="AREA_RATE" id="website-title" placeholder="" value="{$info['AREA_RATE']}" class="input-text">
					</div>
				</div>

				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>每日分红开关：</label>
					<div class="formControls col-xs-8 col-sm-9 skin-minimal">
						<div class="radio-box">
							<input name="DAY_BACK" type="radio" value="1" id="">
							<label for="sex-1">开启</label>
						</div>
						<div class="radio-box">
							<input type="radio" value="0" id="" name="DAY_BACK">
							<label for="sex-2" class="c-red">关闭</label>
						</div>
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						每日交易额分红比例（%）：</label>
					<div class="formControls col-xs-2 col-sm-3">
						<input type="text" name="SUM_RATE" id="website-title" placeholder="" value="{$info['SUM_RATE']}" class="input-text">
					</div>
				</div>
				<!-- <div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">
						<span class="c-red">*</span>
						退单期(天)：</label>
					<div class="formControls col-xs-2 col-sm-3">
						<input type="text" name="BACK_AFTER" id="website-title" placeholder="" value="{$info['BACK_AFTER']}" class="input-text">
					</div>
				</div> -->
				
			</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
				<button onClick="return saveConfig();" class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
				<button class="btn btn-default radius rst hidden" type="reset">&nbsp;&nbsp;重置&nbsp;&nbsp;</button>
			</div>
		</div>
	</form>
</div>

{include file="common/_footer" /}

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
$('.form input[name="BACK_STATUS"][value='+"{$info['BACK_STATUS']}"+']').attr("checked",true);
$('.form input[name="DAY_BACK"][value='+"{$info['DAY_BACK']}"+']').attr("checked",true);
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	$("#tab-system").Huitab({
		index:0
	});
});
// /setting/saveinfo
function saveConfig(){
	$.post("{:url('Setting/index')}",$('.form').serialize()).success(function(data){
		layer.msg(data.msg);
		if(!data.code){
			$('.rst').click();
		}
	});
	return false;
}
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
